Path: api/v1/stock/{stockno}/qtybylocations
This API is JSON:API compliant.
This endpoint supports the following methods:
GET
This endpoint requires an OAuth bearer token, and returns errors in a standard shape. See API Conventions for authentication, error responses and paging, which apply to every endpoint.
The resource type for this endpoint is StockQtyByLocations
The identifier is stockNo-locationNo
Attributes
The StockQtyByLocations resource type attributes are as follows:
| Attribute | Type | Description |
|---|---|---|
| available | number | How many are available for sale. |
| backOrder | number | Quantity on Back Order. |
| branchCode | string | The branch code. Branches are optional in Jim2 - this is only set when your site is configured to use branches. Note: Will not be returned in the response if value is null. |
| branchNo | integer | The internal branch number used to identify the branch. Branches are optional in Jim2 - this is only set when your site is configured to use branches. Note: Will not be returned in the response if value is null. |
| comitted | number | How many are required for jobs. |
| companyCode | string | The code of the card file linked to the company. Multi-company is optional in Jim2 - this is only set when your site is configured to use multiple companies. Note: Will not be returned in the response if value is null. |
| companyNo | integer | The internal company number used to identify the location. Multi-company is optional in Jim2 - this is only set when your site is configured to use multiple companies. Note: Will not be returned in the response if value is null. |
| locationCode | string | The location code where the stock is located. |
| locationNo | integer | The internal location number used to identify the location. |
| manufacturing | number | Quantity being manufactured. This will only be returned if the stock is set as manufactured. Note: Will not be returned in the response if value is null. |
| onHand | number | How many are currently in stock. |
| onPO | number | How many are listed in purchase orders which are not received or finished. |
| onTransfer | number | How many are currently on transfer to this location. |
| reserved | number | How many are currently in jobs which are reserved/ready. |
Path: api/v1/stock/2/qtybylocations Response: This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response. This is a list. To keep the example readable, only the first item below is written out; the later items have been trimmed down in this documentation. In a real response each item comes back with the data applicable to that record (as described above). Side-loading related resources with the include query parameter is not supported on list endpoints: an include parameter is ignored here and no included section is returned. To retrieve a related resource, request it directly using the id shown in each item's relationships, or use the single-resource (get by id) endpoint, which does support include.
Example GET (Return all)
{
"data": [
{
"id": "2-1",
"type": "StockQtyByLocations",
"attributes": {
"companyNo": 1,
"companyCode": "HEADOFFICE",
"branchNo": 1,
"branchCode": "ACT",
"locationNo": 1,
"locationCode": "ACT",
"onHand": 152.0000,
"comitted": 109.0000,
"onTransfer": 0.0,
"reserved": 5.0000,
"onPO": 46.0000,
"available": 43.0000,
"backOrder": 0.0000,
"manufacturing": 8.0000
}
},
{
"id": "2-2",
"type": "StockQtyByLocations",
"attributes": {
"locationCode": "nsw",
"onHand": 12.0000
}
}
]
}
Path: api/v1/stock/2/qtybylocations/2-2 Response: This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.
Example GET (Return specific)
{
"data": {
"id": "2-2",
"type": "StockQtyByLocations",
"attributes": {
"companyNo": 1,
"companyCode": "HEADOFFICE",
"branchNo": 2,
"branchCode": "NSW",
"locationNo": 2,
"locationCode": "nsw",
"onHand": 12.0000,
"comitted": 10.0000,
"onTransfer": 0.0,
"reserved": 0.0000,
"onPO": 0.0000,
"available": 2.0000,
"backOrder": 0.0000,
"manufacturing": 4.0000
}
}
}